Frontier website on www.scripting.com
Your First Script
If you follow the instructions on this page you'll get a great new skill -- you'll be able to add your own commands to the Finder's menu bar.
After downloading Frontier, open the Misc Stuff folder, then open Copy to System Folder, and drag the OSA Menu extension into the Extensions sub-folder of your System Folder. Restart. Launch Frontier. Bring the Finder to the front. You should see a Scripts menu in the Finder's menu bar.
Figure 0: The Finder's menu bar with OSA Menu installed and Frontier 4.0 running.
Choose Menu Editor from the Scripts menu. Frontier comes to the front with its menu bar editing window open and the contents of the Scripts menu displayed.
Figure 1: system.menubars.MACS with the cursor on the Scripts menu. It's collapsed.
Click on the wedge next to Scripts to place the cursor on that line. Collapse the menu if necessary by double-clicking on the wedge. Press return to create a new menu. Type your name and then press Return. Move the new headline under the menu title by pressing the Tab key. Type Hello! and then press Enter. The outline window should look like this:
Figure 2: Picture of system.menubars.MACS with the Hello! command indented under the Dave menu.
Click on the Script button in the upper right corner of the window. A new window opens, showing you an empty script. Type the following text:
dialog.alert (Hello!)
Press Enter. Press Cmd-S to save changes. Option-click in the close box on any window to close all the windows you opened. Bring the Finder to the front. You should see a new menu with your name as its title. Pull it down. You should see one command, Hello! Choose it. A dialog should appear:
Figure 3: Picture of a Finder alert dialog, displaying Hello!
Congratulations. You just wrote a script!
Brent says...
After reading this page, Brent Simmons, co-sysop of the Frontier-beginner's list, sent me an email:
Dave:
On the question of what might be helpful to new people, I must admit that what had me stumped at first was whether Frontier had to be actually running to work its magic.
I was used to the AppleScript extension and the Script Editor, and conceived of Frontier as the UserTalk Script Editor. When I couldn't find the UserTalk scripting extension I was terribly confused.
It wouldn't hurt to state some of these things explicitly, things like "Frontier is an application, not a system extension. In order to work it must be running." Also: "If you double-click on a deskscript it will launch Frontier if it's not already running."
You can perhaps see how someone with an AppleScript background would be easily confused by an application instead of an extension.
Brent
Thanks! Brent is one of the most accomplished Frontier webmasters, but everyone started out not knowing Frontier and so did he. So if you're confused -- don't worry -- you have good company! Ask questions on the Frontier-beginners list and we'll keep updating this page with more glitch-fixers. Keep digging!
Pointers:
- Outliner Crib Sheet -- a quick overview of Frontier's outline-based script editor and menu editor.
- Menu Sharing -- explains how Frontier's menu editor works with apps that support the menu sharing standard.
- Using the Scriptable Finder from Apple -- explanation of the other commands in the Finder's Scripts menu.
- file verbs -- Frontier verbs that work with the Macintosh file system.
- DocServer Website -- All the other built-in verbs.
- We Love AppleScript! -- We really do!
- http://www.wrldpwr.com/ -- Brent Simmons's website.
- Frontier Mailing Lists -- How to subscribe to the Frontier mailing lists.
© Copyright 1996-97 UserLand Software. This page was last built on Wed, Jan 22, 1997 at 2:34:55 PM with Frontier. Thanks for checking it out! Dave